Skip to content

Add characterization tests for Selenium address fail-fast behavior - #2

Draft
jaipilot[bot] wants to merge 1 commit into
jaipilot-campaign/testcontainers-java-11964-headfrom
jaipilot/pr-1-MWR6oGdbAyAj
Draft

Add characterization tests for Selenium address fail-fast behavior#2
jaipilot[bot] wants to merge 1 commit into
jaipilot-campaign/testcontainers-java-11964-headfrom
jaipilot/pr-1-MWR6oGdbAyAj

Conversation

@jaipilot

@jaipilot jaipilot Bot commented Aug 22, 2026

Copy link
Copy Markdown

What

This is a test-only companion for the reviewed PR (which changes getSeleniumAddress() in org.testcontainers.containers.BrowserWebDriverContainer and org.testcontainers.selenium.BrowserWebDriverContainer to throw ContainerLaunchException instead of printStackTrace() + return null on MalformedURLException).

Why

No existing test exercised getSeleniumAddress() or its failure branch, so the PR's new fail-fast contract was unlocked. Adding focused tests proves both the unchanged normal-path URL construction and the new throw-instead-of-null-return behavior without needing Docker, using the same test-subclass pattern already established in modules/postgresql/src/test/java/org/testcontainers/containers/PostgreSQLConnectionURLTest.java (override getHost()/getMappedPort(int)).

Evidence

  • behavior_baseline and behavior_candidate: identical focused command, 4/4 tests passed both times (production code unchanged).
  • Spotless and Checkstyle pass on the new test files.
  • Full non-Docker build (assemble, compileTestJava, spotless, checkstyle, focused tests) passes.
  • The module's Docker-backed integration suite cannot run in this sandbox (no Docker daemon); confirmed the same 20 tests fail identically on the unmodified PR head, so this is a pre-existing environment limitation, not a regression.

Scope

No production code was changed: the PR's two-line-per-file diff was already minimal, correct, and consistent with the repository's existing ContainerLaunchException usage a few lines above in the same configure() methods. Cleanup, performance, and modernization passes found nothing safely improvable within this bounded PR's changed lines.


Generated by JAIPilot Cloud for #1 from Anthropic session sesn_0116YsXpJ6MhMWR6oGdbAyAj.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants